import { useState, useEffect, useContext } from 'react'
import { Tabs, Menu, Button } from 'antd'

import Link from 'next/link'

import { Context } from '@/components/main-content/child-category-my'
import '@/styles/main-content/child-category-my-item.css'

const ChildCategoryMyItem = ({ children }) => {
  useEffect(() => {
    console.log('my item ', children)
  }, [])

  const parentHandleClick = useContext(Context)

  return (
    <>
      <Button
        type="link"
        onClick={() => {
          parentHandleClick(children)
        }}
      >
        {children}
      </Button>
    </>
  )
}

export default ChildCategoryMyItem
